package com.myapp.struts.menu;

import java.util.ArrayList;

public class USDinnerText {

    private static USDinnerText usDinnerTextObj;
    ArrayList<FoodItems> usdinnerTextArray = new ArrayList<FoodItems>();

    public static synchronized USDinnerText getSingletonObject() {
        if (usDinnerTextObj == null) {
            usDinnerTextObj = new USDinnerText();
        }
        return usDinnerTextObj;
    }

    public Object clone() throws CloneNotSupportedException {
        throw new CloneNotSupportedException();
    }

    public String getUSDinnerText(String fileLoc) {
        String fileName = "";

        MenuRead menuReadObj = new MenuRead();
        usdinnerTextArray = menuReadObj.ReadMenu(Constants.US);
        
        MenuGenerate menuGenerateObj = new MenuGenerate();
        usdinnerTextArray = menuGenerateObj.GenerateMenu(usdinnerTextArray, Constants.DINNER);

        MenuFormat menuFormatObj = new MenuFormat();
        fileName = menuFormatObj.FormatMenu(usdinnerTextArray, Constants.TEXT, fileLoc);
        return fileName;

    }
}
